package laya.semi.process;

import java.util.*;
import java.text.*;

import org.apache.log4j.Logger;

public abstract class VariableEvaluateActivity
	implements IGenericClassActivity
{
	private static Logger log = Logger.getLogger(VariableEvaluateActivity.class);

	public void execute(IProcessContext oCtx)
		throws Exception
	{
		String[] vParam = oCtx.getActivityParameter().split(":");
		
		for (int i = 0; i < vParam.length; ++i)
		{
			String[] vDestExpr = vParam[i].split("=");
			oCtx.setField(vDestExpr[0], getObjectValue(vDestExpr[1]));
		}
	}
	
	protected abstract Object getObjectValue(String oExpr)
		throws IllegalArgumentException;
}
